package com.luwak.pattern.proxy;

import java.lang.reflect.Proxy;

/**
 * @author wanggang
 * @date 2018年4月12日 上午9:11:56
 * 
 */
public class ProxyDemo {
	
	public static void main(String[] args) {
		
		Moveable car = (Moveable) Proxy.newProxyInstance(Moveable.class.getClassLoader(), new Class[]{Moveable.class}, new CarProxy(new Car()));
		car.run(1000);
	}

}
